//========encoding:utf-8=========
/*
 * @describe:  三目运算符
 * @author:mhao
 * @copyright:chinasoft.cn
 * @date:2020年3月18日   下午8:12:45
 */
package edu.chinasoft.handle;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import edu.chinasoft.pojo.User;
@Controller("handler03")
@RequestMapping("/handler03")
public class Handler03 {
	private Logger logger = LoggerFactory.getLogger(Handler03.class);
	@RequestMapping("/method01.do")
	public ModelAndView method01(ModelAndView modelAndView,String user_name,String user_password) throws IOException {
		// TODO Auto-generated method stub
		logger.info("Handler03>>>method01 start ……");
		User user = new User(user_name,user_password);
		//把服务层返回的结果保存到request域里
		modelAndView.addObject("user", user);
		//请求转发
		modelAndView.setViewName("/loginsuccess03");
		logger.info("Handler03>>>method01 end ……");
		return modelAndView;
	}
}
